package com.ysz.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ysz.common.utils.PageUtils;
import com.ysz.gulimall.product.entity.CategoryEntity;
import com.ysz.gulimall.product.vo.Catelog2Vo;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author yangshengzhi
 * @email 2069784803@qq.com
 * @date 2023-09-14 15:53:35
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * @description:  查出所有分类 树形结构
     * @param: []
     * @return: java.util.List<com.ysz.gulimall.product.entity.CategoryEntity>
     * @author Yang
     * @date: 2023/9/14 16:04
     */
    List<CategoryEntity> listWithTree();

    void removeMenuByIds(List<Long> asList);

    /**
     * @description:  找到catelogId路径
     * @param: [catelogId]
     * @return: java.lang.Long[]
     * @author Yang
     * @date: 2023/9/19 12:21
     */
    Long[] findCatelogPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevel1Categorys();

    Map<String, List<Catelog2Vo>> getCatalogJson();
}

